package design_pattern.decorator.test1;

/**
 * 装饰者基础类
 *
 * 负责"被装饰者"的传递 和 "被装饰者"原始方法的调用
 * 装饰者的具体增强方法放到装饰者子类中实现
 */
public class DecoratorBase implements Component {
    private Component component;

    public DecoratorBase(Component component) {
        this.component = component;
    }

    @Override
    public void dosomething() {
        this.component.dosomething();
    }
}
